package com.kalua.list.domainmodel.security;

import java.time.Instant;

import com.kalua.list.domainmodel.UUIDIdentifier;

public class UserRegistrationDataImpl implements UserRegistrationData {

	private static final long serialVersionUID = -278810093761942223L;

	private UUIDIdentifier id;
	private Instant registrationDate;
	private String verificationCode;
	private Instant verificationCodeGenerationDate;
	private boolean autoRegistered;
		
	private UserRegistrationDataImpl() {}

	public UserRegistrationDataImpl(	UUIDIdentifier id,
														Instant registrationDate,
														String verificationCode, 
														Instant verificationCodeGenerationDate,
														boolean autoRegistered) {
		this();
		setId(id);
		setRegistrationDate(registrationDate);
		setVerificationCode(verificationCode);
		setVerificationCodeGenerationDate(verificationCodeGenerationDate);
		setAutoRegistered(autoRegistered);
	}
	
	public UserRegistrationDataImpl( Instant registrationDate, 
														String verificationCode,
														Instant verificationCodeGenerationDate, 
														boolean autoRegistered) {
		this(	null,registrationDate,verificationCode,
				verificationCodeGenerationDate, autoRegistered);
	}	

	@Override
	public UUIDIdentifier getId() { return this.id; }
	private void setId(UUIDIdentifier id) { this.id = id; }
	
	@Override
	public Instant getRegistrationDate() { return this.registrationDate; }
	private void setRegistrationDate(Instant registrationDate) 
	{ this.registrationDate = registrationDate; }

	@Override	
	public String getVerificationCode() { return this.verificationCode; }
	private void setVerificationCode(String verificationCode) 
	{ this.verificationCode = verificationCode; }

	@Override	
	public Instant getVerificationCodeGenerationDate() 
	{ return this.verificationCodeGenerationDate; }
	private void setVerificationCodeGenerationDate(Instant verificationCodeGenerationDate) 
	{ this.verificationCodeGenerationDate = verificationCodeGenerationDate; }

	@Override	
	public boolean isAutoRegistered() { return this.autoRegistered;}
	private void setAutoRegistered(boolean autoRegistered) 
	{ this.autoRegistered = autoRegistered; }
}